public class demo2 {
    public static void main(String[] args) {
        //char[]ch={'a','b','c'};
        String d=new String("abc");

        d.intern();
        String c="abc";
        System.out.println(d==c);
    }
    public static void main2(String[] args) {
        String c="tyuhllop";
        if(c.contains("llo"))
        {
            System.out.println("c包含字符串llo");
        }
    }
    public static void main1(String[] args) {
        String a="hello";
        String b="hello";
        String c=new String("hello");
        String d=new String("hello");
        if(a==b)
        {
            System.out.println("a==b");
        }
        if(b==c)
        {
            System.out.println("b==c");
        }
        if(c==d)
        {
            System.out.println("c==d");
        }
    }




}
